import Vue from 'vue';

const list = (params) => {
    return Vue.prototype.$u.get('order/list', params);
};

const detail = (params) => {
    return Vue.prototype.$u.get('order/detail', params);
};


const create = (params) => {
    return Vue.prototype.$u.post('order/create', params);
};


const remove = (params) => {
    return Vue.prototype.$u.delete(`order/remove`, params);
};

const cancel = (params) => {
    return Vue.prototype.$u.post('order/cancel', params);
};

const refund = (params) => {
    return Vue.prototype.$u.post('order/refund', params);
};

const confirm = (params) => {
    return Vue.prototype.$u.post('order/confirm', params);
};

const order_data = (params) => {
    return Vue.prototype.$u.get('order/data_count', params);
};

const remain_check = (params) => {
    return Vue.prototype.$u.post('order/remain_check', params);
};

const express = (params) => {
    return Vue.prototype.$u.get('order/express', params);
};

const pay_check = (params) => {
    return Vue.prototype.$u.get('order/pay_check', params);
};

export default {
    list,
    detail,
    create,
    cancel,
    refund,
    confirm,
    remove,
    order_data,
    remain_check,
    express,
    pay_check
};
